﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="NAntEntity.cs" company="NAntReflectionLib team">
//
// nant-cross-compile, an extension for NAnt for cross-compiling C/C++ applications.
// Copyright (C) 2012 nant-cross-compile team
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program.  If not, see http://www.gnu.org/licenses/. 
// </copyright>
// <history>
//   <historyitem date="2012-10-27" change="Created file"/>
// </history>
// --------------------------------------------------------------------------------------------------------------------
namespace NAntReflectorLib.NAntTypes
{
  using System;
  using System.Collections.Generic;

  /// <summary>
  /// Base NAnt entity.
  /// </summary>
  public class NAntEntity
  {
    /// <summary>
    /// Initializes a new instance of the <see cref="NAntEntity"/> class.
    /// </summary>
    public NAntEntity()
    {
      this.Parameters = new List<NAntEntityParameter>();
      this.NestedElements = new List<NAntEntityParameter>();
      this.Summary = new List<XmlDocElement>();
      this.Remarks = new List<XmlDocElement>();
    }

    /// <summary>
    /// Gets or sets the summary.
    /// </summary>
    /// <value>
    /// The summary.
    /// </value>
    public List<XmlDocElement> Summary { get; set; }

    /// <summary>
    /// Gets or sets the remarks.
    /// </summary>
    /// <value>
    /// The remarks.
    /// </value>
    public List<XmlDocElement> Remarks { get; set; }

    /// <summary>
    /// Gets or sets the name.
    /// </summary>
    /// <value>
    /// The name.
    /// </value>
    public string Name { get; set; }

    /// <summary>
    /// Gets or sets the type of the NAnt element.
    /// </summary>
    /// <value>
    /// The type of the NAnt element.
    /// </value>
    public Type Type { get; set; }

    /// <summary>
    /// Gets the parameters.
    /// </summary>
    /// <value>
    /// The parameters.
    /// </value>
    public List<NAntEntityParameter> Parameters { get; private set; }

    /// <summary>
    /// Gets the nested elements.
    /// </summary>
    /// <value>
    /// The nested elements.
    /// </value>
    public List<NAntEntityParameter> NestedElements { get; private set; }

    /// <summary>
    /// Gets or sets a value indicating whether this instance is abstract.
    /// </summary>
    /// <value>
    /// <c>true</c> if this instance is abstract; otherwise, <c>false</c>.
    /// </value>
    public bool IsAbstract { get; set; }

    /// <summary>
    /// Returns a <see cref="System.String" /> that represents this instance.
    /// </summary>
    /// <returns>
    /// A <see cref="System.String" /> that represents this instance.
    /// </returns>
    public override string ToString()
    {
      return this.Type.FullName;
    }
  }
}
